﻿<%@ Page Title="" Language="C#" MasterPageFile="~/mobile/MobileAdmin.master" AutoEventWireup="true" CodeFile="gender.aspx.cs" Inherits="mobile_charts_gender" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div data-role="content">
        <asp:HiddenField ID="UniID" runat="server" />
        <asp:Chart ID="Chart6" runat="server" DataSourceID="GenderSqlDataSource" Height="300px" 
              Palette="Pastel" Width="300px">
              <Series>
                  <asp:Series ChartType="Pie" Legend="Legend1" Name="Series1" XValueMember="gender" 
                      YValueMembers="Column1">
                  </asp:Series>
              </Series>
              <ChartAreas>
                  <asp:ChartArea Name="ChartArea1">                  
                  </asp:ChartArea>
              </ChartAreas>
              <Legends>
                  <asp:Legend Name="Legend1">                  
                  </asp:Legend>
              </Legends>
          </asp:Chart>
          <asp:SqlDataSource ID="GenderSqlDataSource" runat="server" 
              ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" 
              SelectCommand="select count(*),gender from members where university_id=@uni group by gender">
              <SelectParameters>
                  <asp:ControlParameter ControlID="UniID" Name="uni" PropertyName="Value" />
              </SelectParameters>
        </asp:SqlDataSource>
    </div>
</asp:Content>

